import styled from 'styled-components';
export const Wrapper = styled.div`
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 700;

  outline: 0;
`;

export const Backdrop = styled.div`
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: rgb(74, 74, 75, 0.8);
  z-index: 500;
`;

export const StyledModal = styled.div`
  z-index: 100;
  background: white;
  position: relative;
  margin: auto;
  border-radius: 8px;
  width: 500px;
  height: 300px;
`;
//包装复用
export const WarpStyledModal = styled(StyledModal)`
  background: yellow;
  color: red;
  font-size: 30px;
`;

export const Header = styled.div`
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  padding: 0.3rem;
`;
export const HeaderText = styled.div`
  text-align: center;
  align-self: center;
  color: lightgray;
`;

export const CloseButton = styled.button`
  font-size: 0.8rem;
  border: none;
  border-radius: 3px;
  margin-left: 0.5rem;
  background-color: red;
  color: #fff;
  cursor: pointer;
  :hover {
    cursor: pointer;
  }
  @media screen and (max-width: 800px) {
    color: black;
  }
`;

export const Content = styled.div`
  padding: 30px;
  max-height: 10rem;
  overflow-x: hidden;
  overflow-y: auto;
  width: 300px;
`;
//按钮
export const ConfirmationButtons = styled.div`
  display: flex;
  width: 100%;
  justify-content: space-around;
  height: 20px;
  position: absolute;
  bottom: 25px;
  left: 0px;
`;
export const Message = styled.div`
  font-size: 0.9rem;
  margin-bottom: 10px;
  text-align: center;
`;
export const YesButton = styled.button.attrs({
  backgroundColor: (props) => props.sureHoverColor || props.sureColor,
})`
  flex: 1;
  background-color: ${(props) => props.sureColor};
  border: none;
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
  cursor: pointer;
  :hover {
    background-color: ${(props) => props.sureHoverColor};
    color: #fff;
    cursor: pointer;
  }
`;

export const NoButton = styled.button.attrs({
  backgroundColor: (props) => props.cancelColor || props.cancelHoverColor,
})`
  flex: 1;
  background-color: ${(props) => props.cancelColor};
  border: none;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
  cursor: pointer;
  :hover {
    background-color: ${(props) => props.cancelHoverColor};
    color: #fff;
    cursor: pointer;
  }
`;
